package jackaroo.service.impl;

import jackaroo.dao.RoleMapper;
import jackaroo.pojo.Role;
import jackaroo.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author JackarooZhang
 * @date 2018/6/18 11:42
 */
@Service
public class RoleServiceImpl implements IRoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public Role getRoleById(Role role) {
        if (role == null || role.getId() == null) {
            return null;
        }
        return roleMapper.getRoleById(role.getId());
    }
}
